﻿#include "Thread.h"

Thread::Thread(std::function<int()> func,QObject* parent)
	:QThread(parent),
	m_func(func)
{
	connect(this,&Thread::finished, this, &Thread::deleteLater);
}

void Thread::run()
{
	ret(m_func());
}
